#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QComboBox>
#include "taskbyperson.h"
#include "taskbyproject.h"
#include "taskstorybyversion.h"
#include "hoursbyperson.h"
//#include "versionbyproject.h"
#include "publicstruct.h"
#include "database.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:

    void on_menu_taskbyproject_triggered();

    void on_menu_taskbyperson_triggered();

    void on_menu_hourbyperson_triggered();

    void on_menu_versionplan_triggered();

    void on_menu_checkupdate_triggered();

    void on_menu_exit_triggered();

    void on_menu_versionbyproject_triggered();

private:
    Ui::MainWindow *ui;
    database *dbSqlite;
    TaskByPerson *m_taskByPerson;
    TaskByProject *m_taskByProject;
    TaskStoryByVersion *m_taskStoryByVersion;
    HoursByPerson *m_hoursByPerson;
//    VersionByProject *m_versionByProject;

public:
    database *dbMySql;
    database *dbMySql_1;
    QString m_versionNum;
    QString m_exeFileName;
    QString m_strRemoteUrl;
    QList<PrjVerPlan> m_prjVerPlan;

    void initComboBoxData(QComboBox *cbox, const QString &dataType,const QString &dataCondition);
};
#endif // MAINWINDOW_H
